//各个图片的dom元素
const jiaLu = document.querySelector('#jiaLu');
const cuiHong = document.querySelector('#cuiHong');
const xiaoFeng = document.querySelector('#xiaoFeng');
const jiaChong = document.querySelector('#jiaChong');

const first = document.querySelector('.first');
first.addEventListener("click", function () {
    alert("你好，曾佳璐");
    jiaLu.style.display = "block"
    fuck(jiaLu)
})

// ------------------------------------------------------------
let btn = document.querySelector(".red")
btn.onclick = function () {
    alert('杨翠红');
    cuiHong.style.display = "block"
    fuck(cuiHong)
}

document.querySelector('.box1').addEventListener('click', () => {
    alert('吴嘉聪')
    xiaoFeng.style.display = "block"
    fuck(xiaoFeng)
});

const aa = document.querySelector('.aa');
aa.addEventListener("click", function () {
    alert('曾文锋')
    jiaChong.style.display = "block"
    fuck(jiaChong)
})

//贞凯事件
const qzkBtn = document.querySelector('#qzkId')//按钮
const qzkImg = document.querySelector('#qzkImg')//图片

//点击按钮的函数封装
const qzkFn = () => {
    //点击之后显示图片
    qzkImg.style.display = "block";
    //关闭图片点击
    qzkBtn.removeEventListener("click", qzkFn)
    //定时关闭图片
    setTimeout(() => {
        qzkImg.style.display = "none";
        //开启点击
        qzkBtn.addEventListener("click", qzkFn)
    }, 100);
}

//封装图片消失函数
const fuck = (shit) => {
    setTimeout(() => {
        shit.style.display = "none";
    }, 1000);
}

//覃贞凯按钮点击功能
qzkBtn.addEventListener("click", qzkFn)
